package com.wang.controller;

import com.wang.RedisConfiguration.RedisClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:WangShuliang
 * @Description:
 * @Date:Created in 17:53 2017/10/27
 * @Modified by:
 */
@RestController
public class App {
    @Autowired
    private RedisClient redisClient;
    @RequestMapping("/set")
    public String set(String key,String value) throws  Exception{
        redisClient.set(key, value);
        return "wangshuliang 成功了 哈哈哈哈哈";
    }
    @RequestMapping("/get")
    public String get(String key) throws Exception{
        return redisClient.get(key);
    }
}